package ${classInfo.packageName}.service;

import com.atinbo.model.Outcome;
import com.atinbo.model.PageParam;
import com.atinbo.model.Pagination;
import com.atinbo.model.SortBy;
import ${classInfo.packageName}.model.${classInfo.className}DTO;
import ${classInfo.packageName}.model.${classInfo.className}Param;
import ${classInfo.packageName}.model.${classInfo.className}Query;

import java.util.List;

/**
 * ${classInfo.classComment} Service.
 *
 * @author ${classInfo.author}
 * @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
 */
public interface ${classInfo.className}Service {

    /**
     * 新增.
     *
     * @param ${classInfo.className?uncap_first}Param ${classInfo.className?uncap_first}Param
     * @return Outcome
     */
    Outcome<${classInfo.className}DTO> save(${classInfo.className}Param ${classInfo.className?uncap_first}Param);

    /**
     * 删除.
     *
     * @param query query
     * @return boolean
     */
    boolean delete(${classInfo.className}Query query);

    /**
     * 更新.
     *
     * @param ${classInfo.className?uncap_first}Param ${classInfo.className?uncap_first}Param
     * @param query query
     * @return boolean
     */
    boolean update(${classInfo.className}Param ${classInfo.className?uncap_first}Param, ${classInfo.className}Query query);

    /**
     * 动态查询单个.
     *
     * @param queryParam queryParam
     * @return Outcome
     */
    Outcome<${classInfo.className}DTO> findOne(${classInfo.className}Query queryParam);

    /**
     * 动态查询单个.
     *
     * @param queryParam queryParam
     * @param sort sort
     * @return Outcome
     */
    Outcome<${classInfo.className}DTO> findOne(${classInfo.className}Query queryParam, SortBy sort);

    /**
     * 动态排序查询所有.
     *
     * @param queryParam queryParam
     * @param sort sort
     * @return Outcome
     */
    Outcome<List<${classInfo.className}DTO>> findAll(${classInfo.className}Query queryParam, SortBy sort);

    /**
     * 分页查询.
     *
     *  @param param param
     *  @param pageParam pageParam
     *  @return Outcome
     */
    Outcome<Pagination<${classInfo.className}DTO>> pageList(${classInfo.className}Query param, PageParam pageParam);

}
